import numpy as np
a = np.array([[1,2,3],[4,5,6],[7,8,9]])
print(np.amin(a))
print(np.amin(a,axis=0))
print(np.amin(a,axis=1))
print("------------------")
print(np.max(a))
print(np.max(a,axis=0))
print(np.max(a,axis=1))
print("统计最大值与最小值的差值")
print(np.ptp(a))
print(np.ptp(a,0))
print(np.ptp(a,1))
print("请平均值")
print(np.percentile(a,50))
print(np.percentile(a,50,axis=0))
print(np.percentile(a,50,axis=1))
print("求中位数median，平均数mean")
print(np.median(a))
print(np.mean(a))
print(np.median(a,axis=0))
print(np.mean(a,axis=1))